package day14;
//本类是测试finally代码块的演示demo
public class Test03 {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try{
            String str=null;
            System.out.println(str.length());

        }catch (StringIndexOutOfBoundsException e){
            e.printStackTrace();
            System.out.println("出现了异常");
        }finally {
            System.out.println("finally代码块的代码一定会被运行");
        }
        System.out.println("main执行结束了");
    }

}
